import pandas as pd
import numpy as np
from matplotlib import pyplot as plt

ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000',periods=1000))

# ts = ts.cumsum()

df = pd.DataFrame(np.random.randn(1000,4), index=ts.index,
                  columns=list('ABCD'))

# # ts.plot()
# plt.plot(ts)

df = df.cumsum()
# plt.figure()
df.plot()

# plt.plot(df)
plt.legend(loc='best')
plt.savefig('./1.png')
#todo 为什么用了df.plot(),会出现两次图像
plt.show()


